<template>
  <div class="fsize">
    <el-row :gutter="20">
      <el-col :span="6"><div >编号</div></el-col>
      <el-col :span="6"><div >科室</div></el-col>
      <el-col :span="6"><div >操作</div></el-col>
    </el-row>
    <hr>
    <div class="wrap_item" v-for="order in orinfo" >
      <el-row :gutter="20">
        <el-col :span="6"><div >{{order.id}}</div></el-col>
        <el-col :span="6"><div >{{order.tyname}}</div></el-col>
        <el-col :span="6" ><el-button type="primary" @click="toDetail(order.id)">删除</el-button></el-col>
        <!--<el-col :span="6"><div >{{order.diagnosis}}</div></el-col>-->
      </el-row>
      <hr>
    </div>
  </div>
</template>

<script>
    export default {
        name: "deleteType",
      data() {
        return {
          orinfo: [],
        }
      },
      methods : {
        getList: function () {
          this.$ajax.get('http://47.75.110.31:8080/tyinfo/findAll')
            .then(response => {
              this.orinfo = response.data;
            })
        },
        toDetail(orderid) {
          this.$ajax.get('http://47.75.110.31:8080/tyinfo/delete?id='+orderid)
            .then(response => {
              this.orinfo = response.data;
              location.reload();
            })
        },
      },
      mounted() {
          this.getList();
        }
    }
</script>

<style scoped>
  .fsize{
    font-size: 14px;
  }
</style>
